<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="main" style="height: 500px;"></div>
    <script src="../dist/line_bar.bundle.js"></script>
    <script>
        var mychart = $("#main").ycchart({ title: "测试图" });
        mychart.addDataSource({ x: 1, data: { a: 1, b: 2, c: 3 } });
        setTimeout(function () { mychart.addDataSource({ x: 2, data: { a: 5 } }); }, 500 * 2)
        setTimeout(function () { mychart.addDataSource({ x: 3, data: { a: 6, b: 5 } }); }, 1000 * 2)
        setTimeout(function () { mychart.addDataSource({ x: 4, data: { c: 5 } }); }, 1500 * 2)
        setTimeout(function () { mychart.addDataSource({ x: 5, data: { a: 5 } }); }, 2000 * 2)
        setTimeout(function () { mychart.addDataSource({ x: 6, data: { d: 1 } }); }, 2500 * 2)
        setTimeout(function () { mychart.addDataSource([{ x: 7, data: { a: 1, f: 5 } }, { x: 8, data: { b: 1, c: 1 } }, { x: 9, data: { a: 1, b: 2, c: 3 } }]); }, 3500 * 2)

    </script>
</body>

</html>